package com.wordsay.comparator;

import java.util.Comparator;

import com.wordsay.entity.Talk;

public class TalkTimeComparator implements Comparator {

	@Override
	public int compare(Object arg0,Object arg1) {
		
		Talk talk_1 = (Talk)arg0;
		Talk talk_2 = (Talk)arg1;
		
		if(talk_1.getTime().before(talk_2.getTime())){
			return -1;
		}else if(talk_1.getTime().after(talk_2.getTime())){
			return 1;
		}
		
		return 0;
	}

	
}
